package com.cn.serverline.lineicp.workshopPlan.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * 数字枚举类
 * 该枚举用来判断或者赋值默认值
 * 如：判断前端传值是什么,进行使用
 * @author       pty
 * @version      1.0
 * @since        2024-02-20
 */
@Getter
public enum DigitEnum {
    ZERO(0L, 0L),
    ONE(1L, 1L),
    TWO(2L, 2L),
    THREE(3L, 3L),
    FOUR(4L, 4L),
    FIVE(5L, 5L),
    SIX(6L, 6L),
    SEVEN(7L, 7L);

    /**
     * String类型状态值
     */
    private final Long stringTypeState;

    /**
     * 状态值
     */
    private final Long state;

    DigitEnum(Long stringTypeState, Long state) {
        this.stringTypeState = stringTypeState;
        this.state = state;
    }

    public static List<Long> getStageCode() {
        ArrayList<Long> list = new ArrayList<>();
        for (DigitEnum value : values()) {
            if (value.state != 0L) {
                list.add(value.state);
            }
        }
        return list;
    }
}